<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"
	import="cn.edu.ecut.se2024.controller.SysController, cn.edu.ecut.se2024.model.UserMenu"%>
<script type="text/javascript">
	function validate() {
		var x = document.getElementById("oldPswd")
		if (x.value == "") {
			alert("请先输入旧密码")
			return false
		}

		x = document.getElementById("newPswd")
		var x1 = document.getElementById("newPswd1")
		if (x.value == "" || x1.value == "") {
			alert("请先输入密码")
			return false
		}
		if (x.value != x1.value) {
			alert("两次输入的密码不一致，请重新输入")
			return false
		}
		return true;
	}
</script>

<table>
	<tr>
		<td>
			<form method="post" action="sys.changePassword"
				onsubmit="return validate()">
				<table>
					<tr>
						<td>旧密码：</td>
						<td><input type="password" name="oldPswd" id="oldPswd" /></td>
					</tr>
					<tr>
						<td>新密码：</td>
						<td><input type="password" name="newPswd" id="newPswd" /></td>
					</tr>
					<tr>
						<td>新密码：</td>
						<td><input type="password" name="newPswd1" id="newPswd1" /></td>
					</tr>
					<tr>
						<td colspan="2"><input type="submit" value="修改" /></td>
					</tr>
				</table>
			</form>
		</td>
	</tr>
</table>